<?
require("config.php");

$location_status .= " | Delete";

$show_backnav = "customer_menu";

require($rela_path . "bin/country.php");

$menutype = 2;

if (NULL!=$action){

	$Query = "delete from $table where id = $id";

	myQuery($Query);


	header("location:" . $rela_path . "share/msg.php?v=24");

	exit();

}

if (!checkRecord($table,$id)){

	header("location:" . $rela_path . "share/msg.php?v=9002");
	exit();

}

$Query = "select 
	code,
	username,
	password,
	firstname,
	lastname,
	address,
	country,
	zipcode,
	email,
	tel,
	fax,
	mobile,
	regtime ,id,
	sex,
	hkid,
	birthday,
	edu,
	occupation

from $table where id='$id' Limit 1";
$r = myQuery($Query);

	$Code=		$r[0][13];
	$Username=	$r[0][1];
	$Password=	$r[0][2];
	$Firstname=	$r[0][3];
	$Lastname=	$r[0][4];
	$Address=	$r[0][5];
	$Country=	$r[0][6];
	$Zip=	$r[0][7];
	$Email=	$r[0][8];
	$Tel=	$r[0][9];
	$Fax=	$r[0][10];
	$Mobile=	$r[0][11];
	$Regtime=	$r[0][12];
	$sex =$r[0][14];
	$hkid =$r[0][15];
	$birthday =$r[0][16];
	$edu =$r[0][17];
	$occupation =$r[0][18];	

require($rela_path . "inc/header.php");

?>

<form action="" method="post" name="form1">  

<!--hidden filed-->
<input name="action" type="hidden" value="edit">
<input name="id" type="hidden" value="<?print($id)?>">





<br>
<table width="95%" border="0" align="center">
  <tr> 
    <td width="579" valign="top" height="127"> Are you sure to delete this customer 
      ? 
      <input type="submit" class="button" name="Submit" value="   Yes   ">
      <input type="button" class="button" name="Submit2" value="   No   " onClick="Redirect('customer_menu.php',1)">
      <br>
      <br>
      <table border="0">
        <tr>
          <td class="tdheader">Code :</td>
          <td><?=str_pad($Code,5,'0',STR_PAD_LEFT)?>
          </td>
        </tr>
        <tr>
          <td class="tdheader">Username :</td>
          <td>
            <?=$Username?>
          </td>
        </tr>
        <tr>
          <td class="tdheader">Password :</td>
          <td> ********** </td>
        </tr>
        <tr>
          <td height="3" class="tdheader">First Name :</td>
          <td height="3">
            <?=$Firstname?>
            <font color="red">&nbsp;</font> <b></b></td>
        </tr>
        <tr>
          <td class="tdheader">Last Name :</td>
          <td>
            <?=$Lastname?>
          </td>
        </tr>
        <tr>
          <td class="tdheader">Address :</td>
          <td>
            <?=$Address?>
          </td>
        </tr>
        <tr>
          <td class="tdheader">Country : </td>
          <td>
            <?=$Country?>
          </td>
        </tr>
        <tr>
          <td class="tdheader">Zip Code :</td>
          <td>
            <?=$Zip?>
          </td>
        </tr>
        <tr>
          <td class="tdheader">Email :</td>
          <td>
            <?=$Email?>
          </td>
        </tr>
        <tr>
          <td class="tdheader">Tel :</td>
          <td>
            <?=$Tel?>
          </td>
        </tr>
        <tr>
          <td class="tdheader">Fax :</td>
          <td>
            <?=$Fax?>
          </td>
        </tr>
        <tr>
          <td class="tdheader">Mobile :</td>
          <td>
            <?=$Mobile?>
          </td>
        </tr>
        <tr>
          <td class="tdheader">Register Time :</td>
          <td><?=date('m-d-Y H:i:s',$Regtime)?></td>
        </tr>
        <tr>
          <td class="tdheader">Sex:</td>
          <td><?=$sex?></td>
        </tr>
        <tr>
          <td class="tdheader">HKID:</td>
          <td><?=$hkid?></td>
        </tr>
        <tr>
          <td class="tdheader">Birthday:</td>
          <td><?=$birthday?></td>
        </tr>
        <tr>
          <td class="tdheader">Education:</td>
          <td><?=$edu?></td>
        </tr>
        <tr>
          <td class="tdheader">Occupation:</td>
          <td><?=$occupation?></td>
        </tr>
      </table></td>

  </tr>
</table>
</form>
<br>
<br>
<br>
<?
require($rela_path . "inc/footer.php");
?>
